<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/common/common.jsp"%>
<%@ include file="/WEB-INF/common/taglib.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head></head>
<body>
	<div class="container" style="width:98%;padding:8px;">
		<div class="row">
			<div class="panel panel-default">
				<div class="panel-heading">详情</div>
				<div class="panel-body">
						<form class="form-horizontal" role="form" id="dailogForm" action="<%=path%>/common/doMerge/${tableName}.do" method="POST">
							<c:if test="${not empty modelMap}"></c:if>
							<c:choose>
		   						 <c:when test="${not empty detailList}">
		   								<c:forEach items="${detailList}" var="detailInfo" varStatus="vs">
		   									<div class="form-group">
												<label for="${detailInfo.columnName}" class="col-sm-2 control-label" style="text-align:left;">
														${detailInfo.columnComment}
												</label>
											    <div class="col-sm-8">
											      <input type="text" value="${modelMap[detailInfo['columnName']]}" name="${detailInfo.columnName}" id="${detailInfo.columnName}" class="form-control" readonly="readonly"/>
											    </div>
										    </div>
										 </c:forEach>
								 </c:when>
								 <c:otherwise>
								 	<c:if test="${not empty tableFieldAttributes}">
									<c:forEach items="${tableFieldAttributes}" var="info" varStatus="vs">	
										<c:if test="${info.column_key=='PRI'}">
											<input type="hidden" value="${modelMap[info['column_name']]}" name="${info.column_name}" />
										</c:if>
										<c:if test="${info.column_key!='PRI'}">
											<div class="form-group">
												<label for="${info.column_name}" class="col-sm-2 control-label" style="text-align:left;">
														${info.column_comment}
												</label>
											    <div class="col-sm-8">
											      <input type="text" value="${modelMap[info['column_name']]}" name="${info.column_name}" id="${info.column_name}" class="form-control" readonly="readonly"/>
											    </div>
										    </div>
									    </c:if>
									</c:forEach>
									</c:if>
								 </c:otherwise>
							</c:choose>   
							<div class="form-group">
								<div class="col-sm-offset-5 col-sm-10">
									<a type="button" class="btn btn-sm btn-default" id="formReturn" data-dismiss="modal" href="<%=path%>/common/queryPageList/${tableName}.do">返回</a>
								</div>
 							</div>
						</form>
				</div>
			</div>
		</div>
	</div>
</body>
</html>